#ifndef PATH5C_H_
#define PATH5C_H_

#include "precom.h"
#include <list>

struct Path5CPoint {
	fmath::vector3 m_point;
	fmath::vector2 m_eulerAngles;

	Path5CPoint();
};

class Path5C 
{
private:
	std::list<Path5CPoint> m_path;
	std::list<Path5CPoint>::iterator m_iterNextKnot;
	Path5CPoint		m_curPoint;
	Path5CPoint		m_prevPoint;
	float			m_stepDistance;

protected:
	int CalculateNextPoint(float& a_distance);
public:
	Path5C();
	Path5C(wchar_t* a_fileName);
	~Path5C();

	int LoadFromFile(wchar_t* a_fileName);
	int SaveToFile(wchar_t* a_fileName);
	int TakeStep();
	int TakeStep(float a_distance);
	
	inline float GetStepDistance() { return m_stepDistance; }
	inline void SetStepDistance(float a_val) { m_stepDistance = a_val; }
	inline const Path5CPoint& GetPrevKnot() const { return m_prevPoint; }
	inline const Path5CPoint& GetNextKnot() const { return *m_iterNextKnot; }
	inline const Path5CPoint& GetCurPoint() const { return m_curPoint; }
	inline void AddPath5CPoint(const Path5CPoint& a_elem) { m_path.push_back(a_elem); }
	inline void Clear() { m_path.clear(); }
};

#endif //PATH5C_H_